Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Subprocedures
If you start a database transaction in a main procedure, that transaction remains active even while the main procedure runs called procedures. In Figure 8–6,
p-txn11.prunsp-txn11a.pwithin a database transaction.Figure 8–6: DB transactions and subprocedures
![]()
The
REPEATblockp-txn11.pprocedure is the transaction block for that procedure: it contains a direct update to the database. The database transaction begins at the start of each iteration of theREPEATblock and ends at the end of each iteration. That means when thep-txn11.pprocedure calls thep-txn11a.pprocedure, the transaction is still active. So all the work done in thep-txn11a.psubroutine is part of the transaction started by the main procedure,p-txn11.p.If a system error occurs while you are processing orders for a customer, WebSpeed undoes all the order processing work you have done for that customer, as well as any changes you made to the customer record itself.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |